#!/usr/bin/python
from optparse import OptionParser

import os

version = ".01"

parser = OptionParser()
parser.add_option("-k","--kill",action="store_true",dest="kill",help="Kill's all instances of conky")
parser.add_option("-s","--start",action="store_true",dest="start",help="Starts conky")
parser.add_option("-e","--edit",action="store_true",dest="edit",help="edit conky's configuration")
parser.add_option("-c","--config",dest="config",help="specify an alternate config file",metavar="FILE")
parser.add_option("-v","--verbose",action="store_true",default=False,dest="verbose",help="print more details to the screen")
parser.add_option("-n","--version",action="store_true",dest="version",help="prints version")

(options,args) = parser.parse_args()

if options.verbose:
	if options.start:
		print "Starting Conky..."

	if options.config:
		print "Using %s for configuration" % options.config

	if options.kill:
		print "Killing all instances of Conky"

	if options.edit:
		print "Opening Configuration"


if options.start:
	os.system("conky -q > ~/.conky/conky.log &")

if options.kill:
	os.system("killall -9 conky")

if options.config:
	os.system("conky -q -c %s" % options.config+" &")

if options.edit:
	os.system("$EDITOR ~/.conky/conkyrc")

if options.version:
	print "conkers %s" % version

	
